"""一个用来表示汽车的类"""
class Car:
    """一次模拟汽车的简单尝试"""
    def __init__(self, make, model, year):
        self.make = make
        self.model = model
        self.year = year
        self.odometer_reading = 0

    def get_descriptive_name(self):
        """返回格式规范的描述名称"""
        long_name = f"{self.year} {self.make} {self.model}"
        return long_name.title()

    def read_odometer(self):
        """打印一条消息，指出汽车的行驶里程"""
        print(f"本车公里数为 {self.odometer_reading} km")

    def update_odometer(self, mileage):
        """
        将里程表读数设置为指定的值
        拒绝里程表回调
        :param mileage: int
        :return: 打印
        """
        if mileage >= self.odometer_reading:
            self.odometer_reading = mileage
        else:
            print("你不能回调")

    def increase_odometer(self, miles):
        """
        让里程表增加指定的值
        :param miles: 增加的值
        :return:
        """
        self.odometer_reading += miles


